package com.gcxy.service.impl;

import com.gcxy.entity.SequenceTable;
import com.gcxy.mapper.SequenceTableMapper;
import com.gcxy.service.ISequenceTableService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.Optional;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author author
 * @since 2024-12-30
 */
@Service
public class SequenceTableServiceImpl extends ServiceImpl<SequenceTableMapper, SequenceTable> implements ISequenceTableService {
    @Override
    public String getMaxSequenceNumber() {
        SequenceTable maxEntity = this.baseMapper.selectMaxSequence();
        return maxEntity != null ? maxEntity.getCurrentSequence() : "0000";
    }
}
